<extend name="Common@Layout:hui-admin" />
<block name="title"><title>编辑权限</title></block>
<block name="style">
</block>

<block name="main">
<div class="pd-20">
	<form action="{:U('Adminsadmin/edit_post')}" method="post" class="form form-horizontal validator_form close-dialog">
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>角色：</label>
			<div class="formControls col-6">
				<select name="role" class="input-text" style="width:auto;">
					<volist name="groups" id="vo">
						<option value="{$vo['title']}" <eq name="info['role']" value="$vo['title']">selected</eq>>{$vo['desc']}</option>
					</volist>
					
				</select>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>账户名：</label>
			<div class="formControls col-6">
				<input type="text" class="input-text" name="username" value="{$info.username}" placeholder=""  data-rule="管理员名:required;username;remote[/Users/adminsadmin/checkname/id/{$info.uid|default=0}]">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>密码：</label>
			<div class="formControls col-6">
				<if condition="$info">
					<input type="password" class="input-text" value="" placeholder="" name="password">
				<else/>
					<input type="password" class="input-text" value="" placeholder="" name="password" data-rule="password;required;">
				</if>
			</div>
		</div>
		<div class="row cl">
			<php>
				$info? $remote_mobile= '/users/adminsadmin/check/t/mobile/uid/'.$info['uid']:$remote_mobile = '/users/adminsadmin/check/t/mobile';
			</php>
			<label class="form-label col-2"><span class="c-red">*</span>手机号码：</label>
			<div class="formControls col-6">
			 	<input name="mobile" type="text" class="input-text"  value="{$info.mobile}" data-rule="手机号码:required;mobile;remote[{$remote_mobile}]" data-rule-mobile="[/^(((13[0-9]{1})|(15[0-35-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/,'请输入正确的手机号码']"/>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>状态：</label>
			<div class="formControls col-6">
				<php>if(!isset($info['status'])) $info['status'] = 1;</php>
				<div class="radio-box">
				    <label><input type="radio" name="status" value="1" <eq name="info['status']" value="1">checked</eq>> 启用</label>
				</div>
				<div class="radio-box">
				    <label><input type="radio" name="status" value="0" <eq name="info['status']" value="0">checked</eq>> 禁用</label>
				</div>
			</div>
		</div>
		<div class="row cl">
			<div class="col-10 col-offset-2">
				<input type="hidden" name="uid" value="{$info.uid}">
				<button type="submit" style="width:200px;" class="btn btn-success radius" id="admin-role-save" name="admin-role-save"><i class="icon-ok"></i> 确定</button>
			</div>
		</div>
	</form>
</div>
</block>

<block name="script">
</block>